﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Level_Light_DianXian3 : MonoBehaviour
{
    public GameLevelItem gameLevelItem;
    public Slider slider;

    public GameObject light1;
    public GameObject light2;
    // Start is called before the first frame update
    void Start()
    {
        slider.onValueChanged.AddListener((r) =>
        {
            if (r > 0.95f)
            {
                gameLevelItem.TriggerResult(true);
                light1.SetActive(false);
                light2.SetActive(true);
            }
        });
    }

    // Update is called once per frame
    void Update()
    {

    }
}
